<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTableMessages extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('messages', function (Blueprint $table) {
            $table->increments('id')->comment('信息表主键');
            $table->integer('uid')->default(0)->comment('关联用户表uid');
            $table->integer('mess_meiqiu')->default(0)->comment('给用户发送的煤球');
            $table->char('mess_content',200)->default('')->comment('信息内容');
            $table->tinyInteger('mess_status')->default('0')->comment('消息状态,0未读,1已读');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('messages');
    }
}
